/**
 * pinia
 * @see https://nuxt.com/modules/pinia
 * @see https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt.html pinia 持久化存储
 */
export const useCustomStore = defineStore(
  'custom',
  () => {
    const customVal = ref(100)

    function increment() {
      customVal.value++
    }

    function decrement() {
      customVal.value--
    }

    return {
      customVal,
      increment,
      decrement
    }
  },
  {
    persist: true
  }
)
